// Copyright 2019 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include "core/announce_multiplayer_session.h"
#include "network/network.h"
#include <jni.h>

class MultiplayerState {
public:
    explicit MultiplayerState();
    ~MultiplayerState();

private:
//    std::shared_ptr<Core::AnnounceMultiplayerSession> announce_multiplayer_session;
    Network::RoomMember::CallbackHandle<Network::RoomMember::State> state_callback_handle;
    Network::RoomMember::CallbackHandle<Network::RoomMember::Error> error_callback_handle;

    void OnNetworkStateChanged(const Network::RoomMember::State& state);
    void OnNetworkError(const Network::RoomMember::Error& error);
//    void OnAnnounceFailed(const Common::WebResult&);
    void OnStatusMessageReceive(const Network::StatusMessageEntry&);
};
namespace AiWu {
    bool NetPlayLeaveRoom();
    void InitState();
}
